import { defineComponent, VNode } from "vue";

export default defineComponent({
    props: {
        num: {
            type: Number,
            default: 0
        }
    },
    methods: {
        add(): void {
            this.$emit('add', this.num + 1);
        }

    },
    render(): VNode {
        return (
            <div>
                <span>{this.num}</span>
                <button onClick={this.add}>add</button>
            </div>
        );
    }
})
